package com.mryan.rabbitmq_springboot.helloword;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @description：TODO
 * @Author MRyan
 * @Date 2020/11/13 14:44
 * @Version 1.0
 */
@Component
@RabbitListener(queuesToDeclare = @Queue("hello"))
public class Customer1 {

    @RabbitHandler
    public void receive1(String message) {
        System.out.println("message=:" + message);
    }
}
